import { DomWarBeaBaseListPannel } from "./DomWarBeaBaseListPannel";
import { ILayer } from "../../../../mvc/interfaces/ILayer";
import { Language } from "../../../../../extend/language/Language";
import { ObjCreate } from "../../common/ObjCreate";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { AuctionRankCellRender } from "./AuctionRankCellRender";
import { DataProvider } from "../../../../../fl/data/DataProvider";
//class AuctionRankPannel
    
    export  class AuctionRankPannel extends DomWarBeaBaseListPannel
    {
        constructor(arg1: ILayer=null)
        {
            super(arg1);
            this.setSize(570, 460);
            this.title = Language.getString(90648);
            return;
        }

        protected /* override */ createChildren(): void
        {
            super.createChildren();
            var loc1=33;
            ObjCreate.createGTextField(Language.getString(90651), 40, loc1, 60, 20, this, GlobalStyle.textFormat6);
            ObjCreate.createGTextField(Language.getString(90650), 170, loc1, 150, 20, this, GlobalStyle.textFormat6);
            ObjCreate.createGTextField(Language.getString(90652), 343, loc1, 60, 20, this, GlobalStyle.textFormat6);
            ObjCreate.createGTextField(Language.getString(90628), 488, loc1, 60, 20, this, GlobalStyle.textFormat6);
            this._cellList.setStyle("cellRenderer", AuctionRankCellRender);
            this._cellList.dataProvider = new DataProvider([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2]);
            return;
        }

        public /* override */ update(arg1: Object, ... rest): void
        {
            var loc1=0;
            this._allData = arg1 as Array<any>;
            if (this._allData) 
            {
                loc1 = this._cellList.columnCount * this._cellList.rowCount;
                this._pageSelector.maxPage = Math.ceil(this._allData.length / loc1);
                this._pageSelector.currentPage = 1;
                this.updatePageData();
            }
            return;
        }
    }
